/*
  Jar Jar Links - A utility to repackage and embed Java libraries
  Copyright (C) 2004  Tonic Systems, Inc.

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; see the file COPYING.  if not, write to
  the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA 02111-1307 USA
*/

package com.tonicsystems.jarjar;

class Pair
{
    private Object o1;
    private Object o2;
        
    public Pair(Object o1, Object o2) {
        this.o1 = o1;
        this.o2 = o2;
    }

    public Object getObject1() {
        return o1;
    }

    public Object getObject2() {
        return o2;
    }

    public int hashCode() {
        return o1.hashCode() ^ o2.hashCode();
    }

    public boolean equals(Object o) {
        if (o == null)
            return false;
        if (!(o instanceof Pair))
            return false;
        Pair other = (Pair)o;
        return o1.equals(other.o1) && o2.equals(other.o2);
    }
}
